lst = [3, 5, 1, 6, 7, 34, 9, 2, 6, 8, 20]
num1 = int(input("请输入数值："))
for i, j in enumerate(lst):
    num2 = num1 -j
    if num2 in lst[i+1:]:
        v = lst[i+1:].index(num2)+i+1
        print(f"相加的两个数为{j}和{lst[v]}")
        print(f"下标为{i},{v}")
        break
    if i == len(lst)-1:
        print("没有找到")



